﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Web.Security;
using CCF20Model;
using System.Text;
using System.Reflection;
using System.Web.Profile;
using CCF20Module;
using CCF20Model.ConfigurationFile;
using CCF20;
namespace CCF20Module
{
    /// <summary>
    /// Interaction logic for Login.xaml
    /// </summary>
    public partial class LoginWindow : Window
    {
        
        
        public LoginWindow()
        {
            InitializeComponent();
            var loginVM = (LoginWindowViewModel)ViewModelFactory.CreateViewModel(ViewModleType.LoginWindow);
            this.DataContext = loginVM;
            loginVM.RequestClose += () =>
                {
                    Window_Closing();
                };

            ConfiguraitonHelper.UpdateRegistry();

            if (App.IsMobileBranch)
            {
                this.btnConfig.Visibility = System.Windows.Visibility.Collapsed;
            }
            
        }
        
        
        private void Window_Closing() 
        {     
            this.Close();
        }
        
    }
}
